package com.smart.seckilldemo.rocketmq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;

import org.springframework.stereotype.Component;


/**
 * 消费者服务导入
 */
@Component
@Slf4j
@RocketMQMessageListener(topic = "tp_topic_1",consumerGroup = "consumer_grp_01")
public class RocketMQConsumer implements RocketMQListener<Object> {

    @Override
    public void onMessage(Object msg) {
        log.info("接收到消息"+msg);
    }
}
